package com.yuxi.service;

import com.yuxi.mapper.TTestMapper;
import com.yuxi.model.TTest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by yuxi on 16/11/5.
 */
@Service
public class TTestService {
    @Autowired
    private TTestMapper tTestMapper;
    public List<TTest> getTest(Integer id) {
      return   tTestMapper.selectBlog(id);
    }

    public boolean insert(String username) {
        TTest tt = new TTest();
        tt.setName(username);
        tTestMapper.insertUserWithBackId(tt);
        return true;
    }
}
